home *** CD-ROM | disk | FTP | other *** search
- <?xml version="1.0" encoding="utf-8"?>
- <!-- ===========================================================
- Category: XMLtoXML
- Author: David Silverlight
- HeadGeek@xmlpitstop.com
- Created: 2001-05-16
- Description:-
- This stylsheet will create an output of a subset of
- attributes. Each element generated will contain only two
- attributes from the original input element (CompanyName and
- CustomerID).
- ================================================================ -->
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:output method="xml"/>
-
- <xsl:template match="/">
- <customers>
- <xsl:apply-templates select="/customers/customer" />
- </customers>
- </xsl:template>
-
- <xsl:template match="customer">
- <customer>
- <xsl:attribute name="CompanyName" ><xsl:value-of select="@CompanyName"/></xsl:attribute>
- <xsl:attribute name="CustomerID" ><xsl:value-of select="@CustomerID"/></xsl:attribute>
- </customer>
- <xsl:apply-templates/>
- </xsl:template>
-
- </xsl:stylesheet>